import 'dart:convert';

class ResponseModel {
  final String msg;
  final int code;
  final Map<String, dynamic> data;

  ResponseModel({required this.code, required this.msg,required this.data});


  // 序列化为 JSON
  Map<String, dynamic> toJson() {
    return {
      'code': code,
      'msg': msg,
      'data':data
    };
  }

  // 从 JSON 反序列化
  ResponseModel.fromJson(Map<String, dynamic> json)
      : msg = json['msg'],
        code = json['code'],
        data = json['data'];
}

